package com.woniuxy.carrental.service.impl;

import com.woniuxy.carrental.entity.Emp;
import com.woniuxy.carrental.entity.WarnRecord;
import com.woniuxy.carrental.mapper.WarnRecordMapper;
import com.woniuxy.carrental.service.WarnRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author author
 * @create 2021-10-05 17:50
 */
@Service
public class WarnRecordServiceImpl implements WarnRecordService {

    @Autowired
    WarnRecordMapper warnRecordMapper;


    @Override
    public void addWarnRecord(WarnRecord warnRecord) {
        warnRecordMapper.addWarnRecord(warnRecord);
    }

    @Override
    public void updatewarnRecord(WarnRecord warnRecord) {
        warnRecordMapper.updatewarnRecord(warnRecord);
    }

    @Override
    public List<WarnRecord> selectAllwarnRecord(WarnRecord warnRecord, Integer pageIndex, Integer pageSize) {
        List<WarnRecord> warnRecords = warnRecordMapper.selectAllwarnRecord(warnRecord, pageIndex, pageSize);
        return warnRecords;
    }

    @Override
    public int selectwarnRecordCountBylimit(WarnRecord warnRecord) {

        return warnRecordMapper.selectwarnRecordCountBylimit(warnRecord);
    }

    @Override
    public void delectwarnRecordByid(int warnid) {
        warnRecordMapper.delectwarnRecordByid(warnid);
    }

    @Override
    public List<Emp> getallEmpbyzqq() {
        return warnRecordMapper.getallEmpbyzqq();
    }

    @Override
    public void updateStareBywarnid(int warnid) {
        warnRecordMapper.updateStareBywarnid(warnid);
    }
}
